import QtQuick
import QtQuick.Layouts

import "../communication"
import "./gameMenu"
import "./shopMenu"
import "./startMenu"
import "./warehouseMenu"
import "./startGameMenu"

Item{

    StackLayout{
        anchors.fill: parent

        currentIndex: {
            var cur = EventBus.uiState.currentMenu
            for(var i in children)
            {
                var item = children[i]
                if(item.objectName === cur)
                    return i
            }

            return -1
        }

        StartMenu{
            objectName: "开始"
        }

        GameMenu{
            objectName: "游戏"
        }

        StartGameMenu{
            objectName:"开始游戏"
        }

        ShopMenu{
            objectName: "商城"
        }

        WareHouseMenu{
            objectName: "仓库"
        }

    }


}
